home *** CD-ROM | disk | FTP | other *** search
- on doGuess which
- global gChallengeOrder, gChallengeIndex, gMode, gCycle, gTimer, gResponseOrder, gBlindfold
- go(gMode & "loop")
- if char which of gResponseOrder = char gChallengeIndex of gChallengeOrder then
- normalCenterSpeaker()
- rightGuess(which)
- nextChoice()
- else
- normalCenterSpeaker()
- wrongGuess(#no, which)
- doPage(gBlindfold, gCycle, gMode, gTimer)
- if gCycle then
- go(gMode & "cycle")
- end if
- end if
- end
-
- on wrongGuess icon, which
- global gWorth, gPage
- alignYesNo(which, icon)
- giveNoSnd()
- if gWorth > 0 then
- updateScore(gPage, -gWorth)
- updateStage()
- set gWorth to 0
- end if
- repeat while soundBusy(1) and not (the mouseDown)
- end repeat
- puppetSound(0)
- hideOverlay()
- updateStage()
- end
-
- on rightGuess which
- global gWorth, gPage, gPageScore
- alignYesNo(which, #YES)
- giveYeahSnd()
- if gWorth > 0 then
- set gPageScore to gPageScore + gWorth
- updateScore(gPage, gWorth)
- updateStage()
- end if
- repeat while soundBusy(1) and not (the mouseDown)
- end repeat
- puppetSound(0)
- hideOverlay()
- updateStage()
- end
-
- on nextChoice
- global gChallengeIndex, gResponseOrder, gWorth, gCycle, gTimer, gMode, gPage, gBlindfold, gFlowType
- getPict(0)
- if gChallengeIndex < 4 then
- set gChallengeIndex to gChallengeIndex + 1
- set gResponseOrder to line random(24) of the text of cast "Rand 4 List"
- set gWorth to 5 - gChallengeIndex
- drawText()
- doPage(gBlindfold, gCycle, gMode, gTimer)
- if gCycle then
- go(gMode & "cycle")
- end if
- else
- if gFlowType = #SCRAMBLE then
- hideChallenge()
- end if
- endOfPage(gPage + 1)
- end if
- end
-